package com.fm.demo.bean

import android.os.Parcel
import android.os.Parcelable


/**
 * @CreateData:     2019/11/4 16:22
 * @E-Mail:         709674174@qq.com
 * @Author:         lyy
 * @Description:    实体类
 */

/**
 * 极光推送，tag alias
 * 标签，别名
 */
data class TagAliasBean(
    var action: Int = 0,
    var tags: Set<String> = HashSet(),
    var alias: String = "",
    var isAliasAction: Boolean = false
)

/**
 * 通讯录对象
 */
data class MyContact(
    var name: String = "",
    var phoneNum: String = ""
)

data class PieChartData(
    var color: Int = 0,
    var angle: Float = 0f,
    var proportion: Float = 0f
)

/**
 * 易源笑话
 */
data class JokeEntity(
    var code: Int = 0,
    var message: String = "",
    var result: ArrayList<JokeBean> = ArrayList()
)

data class JokeBean(
    var sid: String = "",
    var text: String = "",
    var type: String = "",
    var thumbnail: String = "",
    var video: String? = null,
    var images: String? = null,
    var up: String = "",
    var down: String = "",
    var forward: String = "",
    var comment: String = "",
    var uid: String = "",
    var name: String = "",
    var header: String = "",
    var top_comments_content: String? = null,
    var top_comments_voiceuri: String? = null,
    var top_comments_uid: String? = null,
    var top_comments_name: String? = null,
    var top_comments_header: String? = null,
    var passtime: String = ""
)

data class TextBean(var data: String? = "", var type: String? = "") : Parcelable {

    constructor(parcel: Parcel) : this(
        parcel.readString(),
        parcel.readString()
    )

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(data)
        parcel.writeString(type)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<TextBean> {
        override fun createFromParcel(parcel: Parcel): TextBean {
            return TextBean(parcel)
        }

        override fun newArray(size: Int): Array<TextBean?> {
            return arrayOfNulls(size)
        }
    }
}